package com.landiao.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.landiao.entities.Appointment;
import com.landiao.entities.AppointmentServiceItem;
import com.landiao.mapper.AppointmentMapper;
import com.landiao.mapper.AppointmentServiceItemMapper;

/**
 * 功能说明: 
 */
@Service
public class AppointmentService extends BaseService<Appointment, String> {

	@Autowired
	private AppointmentServiceItemMapper appointServiceMapper;
	
	@Override
	protected AppointmentMapper getBaseMapper() {
		// TODO Auto-generated method stub
		return (AppointmentMapper)baseMapper;
	}
	
	public void saveAppoint(Appointment appoint,AppointmentServiceItem appointServiceItem){
		this.save(appoint);
		this.appointServiceMapper.insert(appointServiceItem);
	}
	
	public List<Appointment> getSuccessByEmployee(String employeeId){
		return this.getBaseMapper().selectSuccessAppointByEmployee(employeeId);
	}
}
